1. A Tour of Computer Systems


1.1 Information is bits + context

The only thing that distinguishes different data objects is the context in which we view them.

์„œ๋กœ ๋‹ค๋ฅธ ๋ฐ์ดํ„ฐ์ž„์„ ๊ตฌ๋ณ„ํ•  ์ˆ˜ ์žˆ๋Š” ์œ ์ผํ•œ ๋ฐฉ๋ฒ•์€ ๊ทธ๊ฒƒ์„ ๋ฐ”๋ผ๋ณด๋Š” ๋ฌธ๋งฅ ๋ฟ์ด๋‹ค.

1.2 Programs are translated by other programs into different forms

์ถ”๊ฐ€

1.3 It pays to understand how compilation system work

์ปดํŒŒ์ผ์ด ์ง„ํ–‰๋˜๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ๋ฉด ์ฝ”๋“œ๋ฅผ ์ตœ์ ํ™” ์‹œํ‚ฌ ์ˆ˜ ์žˆ๊ณ , ๋ณด์•ˆ์ทจ์•ฝ์ ์œผ๋กœ๋ถ€ํ„ฐ ์•ˆ์ „ํ•œ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, ๋งํฌ ํƒ€์ž„ ์—๋Ÿฌ๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋œ๋‹ค.

1.4 Processors read and interpret instructions stored in memory

์…ธ์˜ ์—ญํ• : ์‚ฌ์šฉ์ž์˜ ๋ช…๋ น์„ ์ž…๋ ฅ์œผ๋กœ ๋ฐ›์•„ ๋‹ค์–‘ํ•œ ์ผ์„ ์ˆ˜ํ–‰ํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ. ์‹คํ–‰ ๊ฐ€๋Šฅํ•œ ํ”„๋กœ๊ทธ๋žจ์„ ์‹คํ–‰์‹œ์ผœ ์ƒˆ ํ”„๋กœ์„ธ์Šค๋กœ ๋งŒ๋“ค์–ด์ฃผ๋Š” ์—ญํ• ์„ ๋‹ด๋‹นํ•œ๋‹ค.

์‹œ์Šคํ…œ์„ ๊ตฌ์„ฑํ•˜๋Š” ํ•˜๋“œ์›จ์–ด ์ปดํฌ๋„ŒํŠธ

Thus, we can distinguish the processor's instruction set architecture, describing the effect of each machine-code instruction, FROM its microarchitecture, describing how the processor is actually implemented.
๋”ฐ๋ผ์„œ, ์šฐ๋ฆฌ๋Š” ํ”„๋กœ์„ธ์„œ์˜ ์„ค๊ณ„๋„์ธ ๋งˆ์ดํฌ๋กœ์•„ํ‚คํ…์ณ์™€ ๊ฐ๊ฐ์˜ ๊ธฐ๊ณ„์–ด๊ฐ€ ์˜๋ฏธํ•˜๋Š” ๋ฐ”๋ฅผ ์„ค๋ช…ํ•˜๋Š” ๋ช…๋ น์–ด ์…‹ ์•„ํ‚คํ…์ฒ˜ ๊ฐ„์˜ ์ฐจ์ด๋ฅผ ๊ตฌ๋ณ„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

DMA
Directed Memory Access๋ผ๊ณ , ์šฐ๋ฆฌ๊ฐ€ ์˜์†์ €์žฅ์žฅ์น˜์— ์ €์žฅ๋œ ์‹คํ–‰ ๊ฐ€๋Šฅํ•œ ํŒŒ์ผ์„ ์‹คํ–‰์‹œํ‚ฌ ๋•Œ CPU๋ฅผ ๊ฑฐ์น˜์ง€ ์•Š๊ณ  ๋ฐ”๋กœ ๋ฉ”๋ชจ๋ฆฌ์— ์ง๋นต์œผ๋กœ ์˜ฌ๋ ค๋ฒ„๋ฆฌ๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ๋‹ค. ๊ทธ๊ฒƒ์€ Direct Memory Access Controller๋ผ๊ณ  ๋ถˆ๋ฆฌ์šฐ๋Š” ๋ณ„๋„์˜ ์นฉ์ด ์žˆ๊ธฐ์— ๊ฐ€๋Šฅํ•˜๋‹ค.

1.5 Caches matter

์ €์žฅ์žฅ์น˜๋Š” ํฌ๊ธฐ๊ฐ€ ํด์ˆ˜๋ก ๋Š๋ฆฌ๊ณ , ๋ฉ€์ˆ˜๋ก ๋Š๋ฆฌ๋‹ค. CPU๊ฐ€ ๋ฐ์ดํ„ฐ๋ฅผ ์ฒ˜๋ฆฌํ•˜๋Š” ์†๋„์˜ ์ฆ๊ฐ€๋Ÿ‰๋ณด๋‹ค ๋ฉ”๋ชจ๋ฆฌ๊ฐ€ ๋ฐ์ดํ„ฐ๋ฅผ ์ฒ˜๋ฆฌํ•˜๋Š” ์†๋„์˜ ์ฆ๊ฐ€๋Ÿ‰์ด ๋Š๋ฆฌ๊ธฐ ๋•Œ๋ฌธ์— ์ด ์ฐจ์ด๋Š” ์‹œ๋Œ€๊ฐ€ ์ง€๋‚ ์ˆ˜๋ก ์ปค์ง„๋‹ค. ๋”ฐ๋ผ์„œ ๋ฉ”์ธ ๋ฉ”๋ชจ๋ฆฌ์™€ CPU ์‚ฌ์ด์— ์บ์‹œ๋ฅผ ๋‹ค๋‹จ๊ณ„๋กœ ๊ฐ–์ถ”์–ด ์ค‘์š”ํ•˜๊ณ  ์ž์ฃผ ์ ‘๊ทผํ•  ๋ฐ์ดํ„ฐ๋“ค์„ ๋น ๋ฅด๊ฒŒ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋„๋ก ๋งŒ๋“ค์—ˆ๋‹ค.

localities

1.6 Storage devices form a hierarchy

register > L1 cache > L2 cache > L3 cache > main memory > disk storage > network

1.7 The operating system manages the hardware

ํ”„๋กœ๊ทธ๋žจ์ด ์‹คํ–‰๋  ๋•Œ ์šฐ๋ฆฌ๋Š” ํ•˜๋“œ์›จ์–ด๋ฅผ ๋…์ ์ ์œผ๋กœ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋‹ค๋Š” ์ฐฉ๊ฐ์„ ํ•˜๊ฒŒ ๋งŒ๋“ ๋‹ค. ๊ทธ ๊ธฐ์ €์—” ์šด์˜์ฒด์ œ๊ฐ€ ๊น”๋ ค์žˆ๊ณ , ์šด์˜์ฒด์ œ๋Š” ๋ ˆ์ด์–ด๋กœ ๊ตฌํ˜„๋˜์–ด์žˆ๋‹ค. ํ•˜๋“œ์›จ์–ด๋ฅผ ๋‹ค๋ฃจ๋Š” ์ž‘์—… (printf, scanf ๋“ฑ๋“ฑ)์„ ์ˆ˜ํ–‰ํ•  ๋•Œ์—๋„ ํ•˜๋“œ์›จ์–ด๋ฅผ ์ปจํŠธ๋กค ํ•˜๋Š” ๋ ˆ์ด์–ด์˜ ์ธํ„ฐํŽ˜์ด์Šค๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์ˆ˜๋ฐ–์— ์—†๋‹ค. ๋ ˆ์ด์–ด ๊ฐ„์˜ ์ถ”์ƒํ™” ๋•๋ถ„์— ๋ณด์•ˆ์ƒ์˜ ์ด์ ๋„ ๊ฐ€์ ธ๊ฐ€๊ณ , ์ธ์ง€๋ถ€ํ•˜๋„ ์ค„์ผ ์ˆ˜ ์žˆ๊ฒŒ ๋˜์—ˆ๋‹ค.

๋‹ค์–‘ํ•œ ์ถ”์ƒํ™”๋“ค

ํ”„๋กœ์„ธ์Šค
syscall์€ ์ปค๋„ ์ฝ”๋“œ์™€ ์œ ์ € ์ฝ”๋“œ๋ฅผ ๋ถ„๋ฆฌํ•˜๋Š” ์ธํ„ฐํŽ˜์ด์Šค์ด๋‹ค

์Šค๋ ˆ๋“œ
ํ•˜๋‚˜์˜ ํ”„๋กœ์„ธ์Šค ์•ˆ์—์„œ๋„ ์—ฌ๋Ÿฌ๊ฐœ์˜ ์‹คํ–‰ํ๋ฆ„์ด ์กด์žฌํ•  ์ˆ˜ ์žˆ๋‹ค.

๊ฐ€์ƒ ๋ฉ”๋ชจ๋ฆฌ

Files

์œ ๋‹‰์Šค ์‹œ์Šคํ…œ์—์„œ ๋ชจ๋“  ๊ฒƒ์€ ํŒŒ์ผ์ด๋‹ค. IO๊ธฐ๊ธฐ๋‚˜ ๋„คํŠธ์›Œํฌ๋„ ํŒŒ์ผ์ด๋ผ๋Š”๊ฑฐ.

1.8 Systems communicate with other systems using networks

WWW, FTP, SSH ๋“ฑ ๋‹ค์–‘ํ•œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜๋“ค์ด ๋„คํŠธ์›Œํฌ ์–ด๋Œ‘ํ„ฐ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ†ต์‹ ํ•œ๋‹ค.

1.9 Important themes

Tnew=(1โˆ’ฮฑ)โ‹…Toldย +ย ฮฑโ‹…Toldk=Told((1โˆ’ฮฑ)+ฮฑk)